///广告信息
class AdsInfoModel {
  String? id;
  String? cover;
  String? href;
  String? title;
  String? officialImg;
  String? officialName;
  String? officialDesc;
  String? officialUrl;
  String? officialType;

  /// 0  - 启动页广告
  /// 1 - 首页-推荐显示小广告
  /// 2 - 首页-推荐公告展示
  /// 3 - 消息界面广告
  /// 4 - 首页-热点  banner广告
  int? position;

  ///同一位置使用此进行排序
  int? sortCode;

  AdsInfoModel({this.id, this.cover, this.href, this.title});

  AdsInfoModel.fromJson(dynamic json) {
    id = json['id'];
    cover = json['cover'];
    href = json['href'];
    position = json['position'];
    sortCode = json['sortCode'];
    title = json['title'];
    officialDesc = json['officialDesc'];
    officialUrl = json['officialUrl'];
    officialName = json['officialName'];
    officialType = json['officialType'];
    officialImg = json['officialImg'];
  }

  static AdsInfoModel fromMap(Map<dynamic, dynamic>? map) {
    map ??= {};
    AdsInfoModel info = AdsInfoModel();
    info.id = map['id'];
    info.cover = map['cover'];
    info.href = map['href'];
    info.position = map['position'];
    info.sortCode = map['sortCode'];
    info.title = map['title'];
    return info;
  }

  Map toJson() => {
        "id": id,
        "cover": cover,
        "href": href,
        "position": position,
        "sortCode": sortCode,
        "title": title,
      };
}
